# src/SConscript begin

Import("env")

# Common object files:

obj_mem = env.Object("util/mem.cpp")
obj_utf8 = env.Object("util/utf8.cpp")
obj_hash = env.Object("util/hash.cpp")
obj_misc = env.Object("util/misc.cpp")
obj_prat = env.Object("util/packrat.cpp")
obj_nfa = env.Object("util/nfa.cpp")
obj_re = env.Object("util/re.cpp")
obj_lex = env.Object("util/lex.cpp")
obj_error = env.Object("util/error.cpp")
obj_ser = env.Object("util/serialize.cpp")
obj_exc = env.Object("util/exception.cpp")
obj_intern = env.Object("adts/intern.cpp")
obj_string = env.Object("adts/string.cpp")
obj_value = env.Object("types/value.cpp")
obj_vm = env.Object("vm/vm.cpp")
obj_vmimage = env.Object("vm/vmimage.cpp")

objects = [obj_mem, obj_utf8, obj_hash, obj_misc, obj_prat, obj_nfa, obj_re,
           obj_string, obj_lex, obj_error, obj_vmimage, obj_ser, obj_intern,
           obj_exc]
libs = ["gc", "gccpp"]

env.Program(target = "../ripescript",
            source = ["ripescript.cpp", obj_vm] + objects,
            LIBS = libs)

env.Program(target = "../ripeasm",
            source = ["ripeasm.cpp"] + objects,
            LIBS = libs)

env.Program(target = "../sdump",
            source = ["sdump.cpp", obj_ser, obj_error, obj_string, obj_mem,
                      obj_exc],
            LIBS = libs)

# src/SConscript end
